#pragma once
#include "Headers.h"
#include "ConsoleForm.h"

using namespace OgreUnified;

class EditorMaterialSerializerListener: public MaterialSerializer::Listener
{
private:
public:
	EditorMaterialSerializerListener()
	{
		 
	}

	~EditorMaterialSerializerListener()
	{

	}

	void materialEventRaised(MaterialSerializer* ser, Ogre::MaterialSerializer::SerializeEvent event, bool& skip, const Material* mat)
	{
		ConsoleForm::Instance->logMessage("materialEventRaised " + mat->getName());
	}
	
	void techniqueEventRaised(MaterialSerializer* ser, Ogre::MaterialSerializer::SerializeEvent event, bool& skip, const Technique* tech)
	{
		ConsoleForm::Instance->logMessage("techniqueEventRaised " + tech->getName());
	}
	
	void passEventRaised(MaterialSerializer* ser, Ogre::MaterialSerializer::SerializeEvent event, bool& skip, const Pass* pass)
	{
		ConsoleForm::Instance->logMessage("passEventRaised " + pass->getName());
	}
			
	void gpuProgramRefEventRaised(	MaterialSerializer* ser, Ogre::MaterialSerializer::SerializeEvent event, bool& skip,
									const Ogre::String& attrib, 
									const GpuProgramPtr& program, 
									const GpuProgramParametersSharedPtr& params,
									GpuProgramParameters* defaultParams)
	{
		ConsoleForm::Instance->logMessage("gpuProgramRefEventRaised");
	}

	void textureUnitStateEventRaised(MaterialSerializer* ser, Ogre::MaterialSerializer::SerializeEvent event, bool& skip, const TextureUnitState* textureUnit)
	{
		ConsoleForm::Instance->logMessage("textureUnitStateEventRaised " + textureUnit->getName());
	}


};